home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / demos / 26 / general / desktop.doc < prev    next >
Encoding:
Text File  |  1986-06-19  |  7.1 KB  |  136 lines

  1. In response to someones query about the desktop.inf.... tah dah -----
  2. Everything you always wanted to know about desktop.inf, but were afraid to
  3. ask.  Below is a typical desktop.inf file (with  a few changes added for
  4. examples).  Below each line is a definition of what each value represents.
  5.  
  6. #a000100
  7. This is the first desk accessory, the rs232 config.  Each 0 represents the
  8. first column of buttons on the set rs232 config dialog box.  The first
  9. 0 is column 1 row 1, the second 0 is coumn 1 row 2, etc.  A 1 value
  10. indicates that a button in the second column was chosen.
  11.  
  12. #b000000
  13. This is the set printer config.  It works the same way as the rs232 config.
  14.  
  15. #c7770007000600070055200505552220770557075055507703111103
  16. This is the color palette.  The color value is set using 3 digits at a time,
  17. representing the red, green and blue values.  The 3111103 at the end deals
  18. with the keyboard repeat rate, and sensitivity.  (None of the above three
  19. will do anything if the associated desk accessory is not loaded)
  20.  
  21. #d
  22. This is apparently reserved for a fourth accessory, and does nothing at
  23. this time (so far as I can see).
  24.  
  25. #E C4 02   (#E=Extras)
  26. This is two things.  The first value has to do with both the Set Preference
  27. dialog and the mouse double click rate.  The byte is broken down as follows
  28. with the indicated bit set performing the noted action:
  29.  
  30. Bit       7       6       5       4       3    |   2       1        0
  31. Value    128     64      32      16       8    |   4       2        1
  32.      displays  sorted  sorted  confirm confirm |   double click rate
  33.        TEXT      by      by    deletes copies  |   all three bits, values
  34.    (if not set  size    date                   |   may only be from 0-4
  35.      displays    \       /                     |   5-7 will turn off the
  36.       icons)     both bits                     |   mouse buttons
  37.                   sort by
  38.                    type
  39.  
  40. If neither bit 5 or 6 is set the sort is by name
  41.  
  42. The second value is 03 for hi rez, 02 for medium rez, or 01 for low rez.
  43.  
  44. #W 00 00 02 0B 2A 0B 08 A:\*.*@        (#W=Window)
  45. #W 00 01 0A 01 45 09 08 A:\TEST.C\*.*@
  46. #W 00 00 0E 09 2A 0B 08 A:\*.INF@
  47. #W 00 00 0F 0A 2A 0B 00 @
  48. The above four are the window defs.  The first number is how far over the
  49. horizontal slider is, the second is the vertical slider.  The third number
  50. is the x coordinate of the left hand side of the window (this takes on even
  51. values, with odd values the same as next lowest even value).  The fourth
  52. number is the y coordinate (this takes single increments).  The fifth and
  53. sixth numbers are the width and height, respectively.  The last number
  54. indicates where on the screen the window will open from. (The window opens
  55. with a different shape and from a different place with each number, but when
  56. you close the window, it will go to another place on the screen.  I have not
  57. hacked at this long enuf to figure it out.)  A zero or FF will not open the
  58. window.  The text indicates which drive's contents will be displayed.  If
  59. the drive does not exist, the window won't open, ie. drive bits not set.
  60. Also, if the display validation is omitted, the window won't open.
  61. The second def above will display the contents of the folder TEST.C, while
  62. The third def above will open a window, and only display the .INF files
  63. on drive A.  If you close and open the window, the files will display as
  64. defined in the file and program defs below.  (NOTE: this only applies to
  65. icon images, every file will display in text  -- except if the file bits
  66. are marked to be hidden, system, volume, read/write and whatever other
  67. bits there are, in which case it won't display at all, but if it is read
  68. only, it will display -- strange HUH?)  The bottom-most open window in
  69. the list will be the active window.
  70.  
  71. #M 00 02 00 FF D FLOPPY DISK@ @      (#M=iMage (?))
  72. #M 00 00 00 FF A DRIVE A@ @
  73. #M 00 01 00 FF B FLOPPY DISK@ @
  74. These describe the icon attributes.  The first two numbers are the column
  75. and row position of the icon.  The column can be from 0-7, the row 0-3.
  76. The third number determines the icon image which will be displayed.  The
  77. image number is the same for this and the remaining defs in desktop.inf, as
  78. follows:
  79.  
  80. 0= disk drive (drawer)       1= folder (sub-directory)      2= trash can
  81. 3= executable file (.PRG, .TOS, or .TTP)   4= text (stack of papers)
  82.  
  83. The fourth value doesn't seem to do anything, but must be a place holder for
  84. an unimplemented function.  The single letter is the drive identifier, and
  85. the text is the drive name.  The first @ indicates the end of the drive name.
  86. The second @ does nothing, but we can speculate as described below for the
  87. file identifiers.  The order in the list determines the visual heirarchy
  88. of the icons, ie. which will display on top when moved over another icon.
  89.  
  90. #T 00 03 02 FF   BLACK HOLE@ @    (#T=Trash)
  91. This is the same as the disk drive.  If you move a disk drive identifier
  92. below this in the list, it will display on top of the trash if moved to the
  93. same location.  The trash has no identifier letter, but you can put one in.
  94.  
  95. #F 03 04   @ *.INF@      (#F=Files)
  96. #D FF 01   @ *.C@        (#D=Directories)
  97. These two determine which type of file or directory will be displayed, when
  98. displayed as icons.  The first line will make GEM display only .INF files
  99. for use with the SHOW, PRINT, CANCEL alert box.  If you delete this line,
  100. no icons will be shown for any file, except as defined below for programs.
  101. The second line does the same for sub-directories, only .C folder icons will
  102. show.  When files are displayed as text, all files will be there, but if
  103. you single click on an 'undefined' file type, the sytem will reboot.  If you
  104. double click, the name will be highlighted, but you can't do anything.
  105.  
  106. #G 03 FF   *.APP@ @      (#G=Gem)
  107. #G 03 FF   *.PRG@ @
  108. #F 02 04   *.TOS@ @      (#F=File)
  109. #P 03 04   *.TTP@ @      (#P=Parameters)
  110. The above four determine the types of files defined as executable images.
  111. Notice that the #F, #D, #G and #P all have two @ symbols.  This is defined
  112. as:  the text before the first @ tells GEM this is a def for an executable
  113. file, while text after the first @ and before the second @ tells GEM that
  114. this is a def for a SHOWable file (ASCII or object).  Note that if both are
  115. specified, like    #G 03 04   1ST_WORD.PRG@ *.TXT@    then when you double
  116. click on any .TXT file, the 1ST_WORD.PRG file will run, and the .TXT file
  117. will be taken as a parameter.
  118. The first number indicates the icon image for the file before the first @,
  119. and the second number indicates the icon image for the file between the @'s.
  120.  
  121. Note that the disk drive def also has two @, which would indicate that the
  122. FF is a def for the text in between the @'s, but I couldn't get anything
  123. to happen.
  124. Try playing around with your desktop.inf by placing different values for the
  125. icon images (can be kinda fun).  Be forewarned, tho, you can thoroughly
  126. confuse GEM, although no harm will result.
  127.  
  128. This concludes the desktop.inf tutorial (for disk based desktop.inf, there
  129. are a couple of desktop.inf's in memory which can do things, too).
  130. There may be more to it, but I haven't figured it out yet.
  131.  
  132. >From Houston,
  133. Michael Vederman
  134.  
  135.  
  136.